package com.example.ice.iconfont

import android.graphics.Typeface
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import com.example.ice.iconfont.icon.IceFonts
import com.example.ice.iconfont.icon.IconDrawable
import kotlinx.android.synthetic.main.activity_icon_font.*

class IconFontActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_icon_font)

        var drawable = IconDrawable(this)
                .typeface(Typeface.createFromAsset(assets, "font/IceFonts.ttf"))
                .iconsMap(IceFonts.iconsMap)
                .icon("gifts")
                .sizeDp(40)
                .run()
        l1.setCompoundDrawables(drawable, null, drawable, null)
    }
}
